<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    		<style type="text/css">
			.buttonC {
				text-align: left
			}
			
			.pagetable {
				font-size: 12px;
			}
			</style>
					<style type="text/css">
			@import "css/rep.css";
			</style>
			<style type="text/css">@import "css/rep.css";</style>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/rep.js"></script>
	<script type="text/javascript" src="js/repStyle.js"></script>
	<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
   </head>
  
  <body>
   <s:form action="CarAction.action" method="post" theme="simple">
    <table class="pagetable">
				<tr>

					<td>
						车牌号
						<s:textfield name="query_carnum" style="width:70px;" />
					</td>
					
					<td>
					    司机
						<s:textfield name="query_driver" style="width:70px;" />
					</td>
					
					<td>
						水箱容积>=
						<s:textfield name="query_cub" style="width:70px;" />
					</td>
					
					<td>
						百公里油耗>=
						<s:textfield name="query_oil" style="width:70px;" />
					</td>
					<td>
						车型
					
					 		<s:select  label="车型"  list="#session.map_car_type" name="query_big" listKey="key" listValue="value"   headerValue="%(#query_big)" emptyOption="true"/>
                    
					</td>
					
					<td>
						所属分公司：
						<s:select  label="公司"  list="#session.subcom_list" name="query_blongto" listKey="id" listValue="comName"  headerKey="-1" headerValue="%{#query_blongto}" emptyOption="false"/>
                    
					</td>
					<td>
						<s:submit value="查询" method="toGetCarList" onclick='setfistpage()' />
						<input type=button value="导出" onclick=	'Copy2Excel(myTable);'>
					</td>

				</tr>
			</table>

			<table id="myTable" class="tablesorter">
				<thead>
				      <tr>
				         <th>ID </th>
				         <th>车牌号</th>
				         <th>所属公司</th>
				         <th>司机</th>
				         <th>发动机编号</th>
				         <th>放热允许误差率</th>
				         <th>百公里油耗</th>
				         <th> 水箱容积</th>
				         <th> </th>
      				  </tr>
      		</thead>
      		
      		<tbody>
			       <s:iterator id="list" value="list" >
			        <tr>
			         <td><s:property  value="id"/> </td>
			         <td><s:property  value="num"/> </td>
			         <td>
			        	 <s:select theme="simple" list="#session.subcom_list" name="company" listKey="id" listValue="comName" headerValue="company" />  
			         </td>
			         <td><s:property  value="driver"/> </td>
			         <td><s:property  value="engineNum"/> </td>
			         
			         <td><s:property  value="extAttr1"/> </td>
			         <td><s:property  value="extAttr2"/> </td>
			         <td><s:property  value="extAttr3"/> </td>
			        
			         <td>
			          <a href="CarAction!findbyid.action?id=<s:property value="id"/>">编辑</a>
			         </td>
			        
			          <!--<a href="CarAction!delete?id=<s:property value="id"/>">删除</a> -->
			       
			        </tr>
			       </s:iterator>
       </tbody>
    </table>
      <!-----------------------分页部分---------------------------------------->
      
      
		<table width="850" border="0" class="pagetable">
			  	<tr>
			    	<td>　				
								
							当前第<s:property value="page"/> 页,共<s:property value="planNum"/>条记录, 共分<s:property value="totalPage"/>页
					
				<input type="hidden" name="maxNum" value="">
			    	<input type="hidden" name="page" id="page" value="<s:property value="page"/>">
			    		
						<s:submit value="首页" onclick='setfistpage()' method="toGetCarList"></s:submit>	
						<s:if test="page<=1">
						上一页
						</s:if>
						<s:else>
							<s:submit value="上一页" onclick='setlastpage(%{page})' method="toGetCarList"></s:submit>		
							
						</s:else>
								
						<s:if test="page>=totalPage">
						 下一页
						</s:if>
					    <s:else>
						<s:submit value="下一页"  onclick='setnextpage(%{page})' method="toGetCarList"></s:submit>	
				
					    </s:else>
						<s:submit value="尾页" onclick='settaltolpage(%{totalPage})' method="toGetCarList"></s:submit>	
						
						</td>
					
			</table>
        <!-----------------------分页部分---------------------------- -->
    </s:form>

  </body>
</html>
